﻿@{
    ViewData["Title"] = "Home Page";
}

<head>
    <style>
        table,
        td,
        th {
            border: 1px solid;
        }
    </style>
</head>

<body>
    <input name="Text" type="text" placeholder="请输入关键字">
    <input type="button" value="搜索" onclick="Select()">
    <input type="button" value="添加" onclick="Insert()">
    <table class="tb">
        <tr>
            <th>ID:</th>
            <th>商品名称:</th>
            <th>供应商名称:</th>
            <th>价格:</th>
            <th>库存数量:</th>
            <th>备注:</th>
            <th>操作</th>
        </tr>
        @foreach (ProductInfo item in Model)
        {
            <tr class="tbrow">
                <td>@item.Id</td>
                <td>@item.ProductName</td>
                <td>@item.Supplier</td>
                <td>@item.Price</td>
                <td>@item.Stock </td>
                <td>@item.Remarks</td>
                <td>
                    <input type="button" value="修改" onclick="Update(@item.Id)">
                    <input type="button" value="删除" onclick="Delete(@item.Id)">
                </td>
            </tr>
        }
    </table>
    <script src="~/lib/jquery/dist/jquery.min.js"></script>
    <script src="~/js/base.js"></script>
</body>